package com.soar.tbox.bean;

import java.io.ByteArrayOutputStream;
import java.io.IOException;

/**
 * 指令参数
 * 
 * @author songjunjie
 * 
 */
public class Paramter {
	private byte[] key;
	private byte[] len;
	private byte[] value;

	public byte[] getKey() {
		return key;
	}

	public void setKey(byte[] key) {
		this.key = key;
	}

	public byte[] getLen() {
		return len;
	}

	public void setLen(byte[] len) {
		this.len = len;
	}

	public byte[] getValue() {
		return value;
	}

	public void setValue(byte[] value) {
		this.value = value;
	}
	
	public byte[] toByteArray() throws IOException{
		ByteArrayOutputStream out = new ByteArrayOutputStream();
		out.write(this.key);
		out.write(this.len);
		out.write(this.value);
		return out.toByteArray();
	}

}
